<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/* asn1tsp-2.0.0.js (c) 2014-2020 Kenji Urushima | kjur.github.com/jsrsasign/license
<span class='line'>  2</span>  */</span><span class="WHIT">
<span class='line'>  3</span> </span><span class="COMM">/*
<span class='line'>  4</span>  * asn1tsp.js - ASN.1 DER encoder classes for RFC 3161 Time Stamp Protocol
<span class='line'>  5</span>  *
<span class='line'>  6</span>  * Copyright (c) 2014-2017 Kenji Urushima (kenji.urushima@gmail.com)
<span class='line'>  7</span>  *
<span class='line'>  8</span>  * This software is licensed under the terms of the MIT License.
<span class='line'>  9</span>  * https://kjur.github.io/jsrsasign/license
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * The above copyright and license notice shall be 
<span class='line'> 12</span>  * included in all copies or substantial portions of the Software.
<span class='line'> 13</span>  */</span><span class="WHIT">
<span class='line'> 14</span> 
<span class='line'> 15</span> </span><span class="COMM">/**
<span class='line'> 16</span>  * @fileOverview
<span class='line'> 17</span>  * @name asn1tsp-1.0.js
<span class='line'> 18</span>  * @author Kenji Urushima kenji.urushima@gmail.com
<span class='line'> 19</span>  * @version jsrsasign 10.0.0 asn1tsp 2.0.0 (2020-Sep-22)
<span class='line'> 20</span>  * @since jsrsasign 4.5.1
<span class='line'> 21</span>  * @license &lt;a href="https://kjur.github.io/jsrsasign/license/">MIT License&lt;/a>
<span class='line'> 22</span>  */</span><span class="WHIT">
<span class='line'> 23</span> 
<span class='line'> 24</span> </span><span class="COMM">/* 
<span class='line'> 25</span>  * kjur's class library name space
<span class='line'> 26</span>  * // already documented in asn1-1.0.js
<span class='line'> 27</span>  * @name KJUR
<span class='line'> 28</span>  * @namespace kjur's class library name space
<span class='line'> 29</span>  */</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">KJUR</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 31</span> 
<span class='line'> 32</span> </span><span class="COMM">/*
<span class='line'> 33</span>  * kjur's ASN.1 class library name space
<span class='line'> 34</span>  * // already documented in asn1-1.0.js
<span class='line'> 35</span>  * @name KJUR.asn1
<span class='line'> 36</span>  * @namespace
<span class='line'> 37</span>  */</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">KJUR.asn1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 39</span> 
<span class='line'> 40</span> </span><span class="COMM">/**
<span class='line'> 41</span>  * kjur's ASN.1 class for RFC 3161 Time Stamp Protocol
<span class='line'> 42</span>  * &lt;p>
<span class='line'> 43</span>  * This name space provides 
<span class='line'> 44</span>  * &lt;a href="https://tools.ietf.org/html/rfc3161">RFC 3161
<span class='line'> 45</span>  * Time-Stamp Protocol(TSP)&lt;/a> data generator.
<span class='line'> 46</span>  *
<span class='line'> 47</span>  * &lt;h4>FEATURES&lt;/h4>
<span class='line'> 48</span>  * &lt;ul>
<span class='line'> 49</span>  * &lt;li>easily generate CMS SignedData&lt;/li>
<span class='line'> 50</span>  * &lt;li>APIs are very similar to BouncyCastle library ASN.1 classes. So easy to learn.&lt;/li>
<span class='line'> 51</span>  * &lt;/ul>
<span class='line'> 52</span>  * 
<span class='line'> 53</span>  * &lt;h4>PROVIDED CLASSES&lt;/h4>
<span class='line'> 54</span>  * &lt;ul>
<span class='line'> 55</span>  * &lt;/ul>
<span class='line'> 56</span>  * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
<span class='line'> 57</span>  * &lt;/p>
<span class='line'> 58</span>  * @name KJUR.asn1.tsp
<span class='line'> 59</span>  * @namespace
<span class='line'> 60</span>  */</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.tsp</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">KJUR.asn1.tsp</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 62</span> 
<span class='line'> 63</span> </span><span class="COMM">/**
<span class='line'> 64</span>  * class for TSP TimeStampToken ASN.1 object&lt;br/>
<span class='line'> 65</span>  * @name KJUR.asn1.tsp.TimeStampToken
<span class='line'> 66</span>  * @class class for TSP TimeStampToken ASN.1 object
<span class='line'> 67</span>  * @param {Array} params JSON object for constructor parameters
<span class='line'> 68</span>  * @extends KJUR.asn1.cms.SignedData
<span class='line'> 69</span>  * @since jsrsasign 10.0.0 asn1tsp 2.0.0
<span class='line'> 70</span>  * @see KJUR.asn1.tsp.TimeStampResp
<span class='line'> 71</span>  * @see KJUR.asn1.tsp.TSTInfo
<span class='line'> 72</span>  *
<span class='line'> 73</span>  * @description
<span class='line'> 74</span>  * This is an ASN.1 encoder for TimeStampToken
<span class='line'> 75</span>  * ASN.1 structure defined in
<span class='line'> 76</span>  * &lt;a href="https://tools.ietf.org/html/rfc3161#section-2.4.2">
<span class='line'> 77</span>  * RFC 3161 TSP section 2.4.2&lt;/a>.
<span class='line'> 78</span>  * &lt;pre>
<span class='line'> 79</span>  * TimeStampToken ::= ContentInfo
<span class='line'> 80</span>  *   -- contentType is id-signedData ([CMS])
<span class='line'> 81</span>  *   -- content is SignedData ([CMS])
<span class='line'> 82</span>  * id-ct-TSTInfo  OBJECT IDENTIFIER ::= { iso(1) member-body(2)
<span class='line'> 83</span>  * us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 4}
<span class='line'> 84</span>  * &lt;/pre>
<span class='line'> 85</span>  * Constructor argument "params" is similar to
<span class='line'> 86</span>  * {@link KJUR.asn1.cms.SignedData} however "econtent"
<span class='line'> 87</span>  * value is different as follows:
<span class='line'> 88</span>  * &lt;ul>
<span class='line'> 89</span>  * &lt;li>econtent.type - shall be "tstinfo"&lt;/li>
<span class='line'> 90</span>  * &lt;li>econtent.content - shall be {@link KJUR.asn1.tsp.TSTInfo} parameter&lt;/li>
<span class='line'> 91</span>  * &lt;/ul>
<span class='line'> 92</span>  *
<span class='line'> 93</span>  * @example
<span class='line'> 94</span>  * new KJUR.asn1.tsp.TimeStampToken({
<span class='line'> 95</span>  *   version: 1,
<span class='line'> 96</span>  *   hashalgs: ["sha256"],
<span class='line'> 97</span>  *   econtent: {
<span class='line'> 98</span>  *     type: "tstinfo",
<span class='line'> 99</span>  *     content: {
<span class='line'>100</span>  *       policy: '1.2.3.4.5',
<span class='line'>101</span>  *       messageImprint: { hashAlg: 'sha1', hashValue: 'a1a2a3a4' },
<span class='line'>102</span>  *       serialNumber: {'int': 3},
<span class='line'>103</span>  *       genTime: {str: '20131231235959.123Z', millis: true},
<span class='line'>104</span>  *       accuracy: { millis: 500 },
<span class='line'>105</span>  *       ordering: true,
<span class='line'>106</span>  *       nonce: {'int': 3},
<span class='line'>107</span>  *     }
<span class='line'>108</span>  *   },
<span class='line'>109</span>  *   sinfos: [{
<span class='line'>110</span>  *     version: 1,
<span class='line'>111</span>  *     id: {type:'isssn', cert: sZ4_CERPEM},
<span class='line'>112</span>  *     hashalg: "sha256",
<span class='line'>113</span>  *     sattrs: {array: [{
<span class='line'>114</span>  *       attr: "contentType",
<span class='line'>115</span>  *       type: "data"
<span class='line'>116</span>  *     },{
<span class='line'>117</span>  *       attr: "signingTime",
<span class='line'>118</span>  *       str: '131231235959Z'
<span class='line'>119</span>  *     },{
<span class='line'>120</span>  *       attr: "messageDigest",
<span class='line'>121</span>  *       hex: 'ffff'
<span class='line'>122</span>  *     }]},
<span class='line'>123</span>  *     sigalg: "SHA256withRSA",
<span class='line'>124</span>  *     signkey: sZ4_PRVP8PPEM
<span class='line'>125</span>  *   }]
<span class='line'>126</span>  * })
<span class='line'>127</span>  */</span><span class="WHIT">
<span class='line'>128</span> </span><span class="NAME">KJUR.asn1.tsp.TimeStampToken</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>132</span> 
<span class='line'>133</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.TimeStampToken.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> 
<span class='line'>135</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>136</span> 
<span class='line'>137</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHexPrepare</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">	</span><span class="COMM">//alert("getEncodedHexPrepare called...");</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dTSTInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.TSTInfo</span><span class="PUNC">(</span><span class="NAME">this.params.econtent.content</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">	</span><span class="NAME">this.params.econtent.content.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dTSTInfo.getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>142</span> 
<span class='line'>143</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>144</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>145</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.TimeStampToken</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.cms.SignedData</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>146</span> 
<span class='line'>147</span> </span><span class="COMM">/**
<span class='line'>148</span>  * class for TSP TSTInfo ASN.1 object
<span class='line'>149</span>  * @name KJUR.asn1.tsp.TSTInfo
<span class='line'>150</span>  * @class class for TSP TSTInfo ASN.1 object
<span class='line'>151</span>  * @param {Array} params JSON object for TSTInfo parameters
<span class='line'>152</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>153</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>154</span>  * @see KJUR.asn1.x509.X500Name
<span class='line'>155</span>  * @see KJUR.asn1.x509.GeneralName
<span class='line'>156</span>  * @description
<span class='line'>157</span>  * This class represents TSTInfo ASN.1 structure.
<span class='line'>158</span>  * &lt;pre>
<span class='line'>159</span>  * TSTInfo ::= SEQUENCE  {
<span class='line'>160</span>  *    version         INTEGER  { v1(1) },
<span class='line'>161</span>  *    policy          TSAPolicyId,
<span class='line'>162</span>  *    messageImprint  MessageImprint,
<span class='line'>163</span>  *    serialNumber    INTEGER, -- up to 160bit
<span class='line'>164</span>  *    genTime         GeneralizedTime,
<span class='line'>165</span>  *    accuracy        Accuracy                 OPTIONAL,
<span class='line'>166</span>  *    ordering        BOOLEAN                  DEFAULT FALSE,
<span class='line'>167</span>  *    nonce           INTEGER                  OPTIONAL,
<span class='line'>168</span>  *    tsa             [0] GeneralName          OPTIONAL,
<span class='line'>169</span>  *    extensions      [1] IMPLICIT Extensions  OPTIONAL   }
<span class='line'>170</span>  * &lt;/pre>
<span class='line'>171</span>  * For "params" arguent, following properties are accepted:
<span class='line'>172</span>  * &lt;ul>
<span class='line'>173</span>  * &lt;li>{Array}tsa - {@link KJUR.asn1.x509.X500Name} parameter for
<span class='line'>174</span>  * tsa field even though tsa field is GeneralName.&lt;/li>
<span class='line'>175</span>  * &lt;/ul>
<span class='line'>176</span>  * @example
<span class='line'>177</span>  * o = new KJUR.asn1.tsp.TSTInfo({
<span class='line'>178</span>  *     policy:    '1.2.3.4.5',
<span class='line'>179</span>  *     messageImprint: {alg: 'sha256', hash: '1abc...'},
<span class='line'>180</span>  *     genTime:   {millis: true},         // OPTION
<span class='line'>181</span>  *     accuracy:  {micros: 500},          // OPTION
<span class='line'>182</span>  *     ordering:  true,                   // OPITON
<span class='line'>183</span>  *     nonce:     {hex: '52fab1...'},     // OPTION
<span class='line'>184</span>  *     tsa:       {str: '/C=US/O=TSA1'}   // OPITON
<span class='line'>185</span>  * });
<span class='line'>186</span>  */</span><span class="WHIT">
<span class='line'>187</span> </span><span class="NAME">KJUR.asn1.tsp.TSTInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>188</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">	</span><span class="NAME">_DERBoolean</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBoolean</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT">	</span><span class="NAME">_DERGeneralizedTime</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERGeneralizedTime</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>194</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>195</span> </span><span class="WHIT">	</span><span class="NAME">_DERTaggedObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERTaggedObject</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>196</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>197</span> </span><span class="WHIT">	</span><span class="NAME">_MessageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.MessageImprint</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT">	</span><span class="NAME">_Accuracy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.Accuracy</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">        </span><span class="NAME">_X500Name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.X500Name</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">        </span><span class="NAME">_GeneralName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509.GeneralName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">	
<span class='line'>202</span> 
<span class='line'>203</span>     </span><span class="NAME">_KJUR_asn1_tsp.TSTInfo.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>204</span> 
<span class='line'>205</span> </span><span class="WHIT">    </span><span class="NAME">this.dVersion</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>206</span> </span><span class="WHIT">    </span><span class="NAME">this.dPolicy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>207</span> </span><span class="WHIT">    </span><span class="NAME">this.dMessageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT">    </span><span class="NAME">this.dSerialNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT">    </span><span class="NAME">this.dGenTime</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>210</span> </span><span class="WHIT">    </span><span class="NAME">this.dAccuracy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>211</span> </span><span class="WHIT">    </span><span class="NAME">this.dOrdering</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>212</span> </span><span class="WHIT">    </span><span class="NAME">this.dNonce</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>213</span> </span><span class="WHIT">    </span><span class="NAME">this.dTsa</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>214</span> 
<span class='line'>215</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>216</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">this.dVersion</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>217</span> 
<span class='line'>218</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dPolicy</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"policy shall be specified."</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT">        </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dPolicy</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>220</span> 
<span class='line'>221</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dMessageImprint</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>222</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"messageImprint shall be specified."</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>223</span> </span><span class="WHIT">        </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dMessageImprint</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>224</span> 
<span class='line'>225</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dSerialNumber</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>226</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"serialNumber shall be specified."</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>227</span> </span><span class="WHIT">        </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dSerialNumber</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>228</span> 
<span class='line'>229</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dGenTime</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">            </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"genTime shall be specified."</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">        </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dGenTime</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>232</span> 
<span class='line'>233</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dAccuracy</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dAccuracy</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dOrdering</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dOrdering</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>235</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dNonce</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dNonce</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dTsa</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.dTsa</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>237</span> 
<span class='line'>238</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">        </span><span class="NAME">this.hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">seq.getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.hTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>242</span> 
<span class='line'>243</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>244</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.policy</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>245</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">params.policy.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9.]+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>246</span> </span><span class="WHIT">                </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"policy shall be oid like 0.1.4.134"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>247</span> </span><span class="WHIT">            </span><span class="NAME">this.dPolicy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">oid</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.policy</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.messageImprint</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">            </span><span class="NAME">this.dMessageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_MessageImprint</span><span class="PUNC">(</span><span class="NAME">params.messageImprint</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.serialNumber</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>253</span> </span><span class="WHIT">            </span><span class="NAME">this.dSerialNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="NAME">params.serialNumber</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>254</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.genTime</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT">            </span><span class="NAME">this.dGenTime</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERGeneralizedTime</span><span class="PUNC">(</span><span class="NAME">params.genTime</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.accuracy</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">            </span><span class="NAME">this.dAccuracy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Accuracy</span><span class="PUNC">(</span><span class="NAME">params.accuracy</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.ordering</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT">            </span><span class="NAME">params.ordering</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT">            </span><span class="NAME">this.dOrdering</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBoolean</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.nonce</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>266</span> </span><span class="WHIT">            </span><span class="NAME">this.dNonce</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="NAME">params.nonce</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>267</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.tsa</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>269</span> </span><span class="WHIT">            </span><span class="NAME">this.dTsa</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERTaggedObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>270</span> </span><span class="WHIT">		</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT">		</span><span class="NAME">explicit</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>272</span> </span><span class="WHIT">		</span><span class="NAME">obj</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_GeneralName</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">dn</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.tsa</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>273</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>276</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>277</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.TSTInfo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>278</span> 
<span class='line'>279</span> </span><span class="COMM">/**
<span class='line'>280</span>  * class for TSP Accuracy ASN.1 object
<span class='line'>281</span>  * @name KJUR.asn1.tsp.Accuracy
<span class='line'>282</span>  * @class class for TSP Accuracy ASN.1 object
<span class='line'>283</span>  * @param {Array} params associative array of parameters
<span class='line'>284</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>285</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>286</span>  *
<span class='line'>287</span>  * @description
<span class='line'>288</span>  * This is an ASN.1 encoder for Accuracy
<span class='line'>289</span>  * ASN.1 structure defined in
<span class='line'>290</span>  * &lt;a href="https://tools.ietf.org/html/rfc3161#section-2.4.2">
<span class='line'>291</span>  * RFC 3161 TSP section 2.4.2&lt;/a>.
<span class='line'>292</span>  * &lt;pre>
<span class='line'>293</span>  * Accuracy ::= SEQUENCE {
<span class='line'>294</span>  *    seconds        INTEGER              OPTIONAL,
<span class='line'>295</span>  *    millis     [0] INTEGER  (1..999)    OPTIONAL,
<span class='line'>296</span>  *    micros     [1] INTEGER  (1..999)    OPTIONAL  }
<span class='line'>297</span>  * &lt;/pre>
<span class='line'>298</span>  *
<span class='line'>299</span>  * @example
<span class='line'>300</span>  * new KJUR.asn1.tsp.Accuracy({
<span class='line'>301</span>  *   seconds: 1,   // OPTION
<span class='line'>302</span>  *   millis: 500,  // OPTION
<span class='line'>303</span>  *   micros: 500   // OPTION
<span class='line'>304</span>  * });
<span class='line'>305</span>  */</span><span class="WHIT">
<span class='line'>306</span> </span><span class="NAME">KJUR.asn1.tsp.Accuracy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>308</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>309</span> </span><span class="WHIT">	</span><span class="NAME">_newObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Util.newObject</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>310</span> 
<span class='line'>311</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1.tsp.Accuracy.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>312</span> 
<span class='line'>313</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>314</span> 
<span class='line'>315</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>316</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>317</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>318</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.seconds</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>319</span> </span><span class="WHIT">	    </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.seconds</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>320</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.seconds</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>321</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>322</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.millis</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>323</span> </span><span class="WHIT">	    </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.millis</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>324</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="STRN">"80"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.millis</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>325</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>326</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.micros</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>327</span> </span><span class="WHIT">	    </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params.micros</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>328</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">tag</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">tagi</span><span class="PUNC">:</span><span class="STRN">"81"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.micros</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>329</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>330</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_newObject</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"seq"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>331</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>332</span> 
<span class='line'>333</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>334</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>335</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.Accuracy</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>336</span> 
<span class='line'>337</span> </span><span class="COMM">/**
<span class='line'>338</span>  * class for TSP MessageImprint ASN.1 object
<span class='line'>339</span>  * @name KJUR.asn1.tsp.MessageImprint
<span class='line'>340</span>  * @class class for TSP MessageImprint ASN.1 object
<span class='line'>341</span>  * @param {Array} params associative array of parameters
<span class='line'>342</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>343</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>344</span>  *
<span class='line'>345</span>  * @description
<span class='line'>346</span>  * This is an ASN.1 encoder for Accuracy
<span class='line'>347</span>  * ASN.1 structure defined in
<span class='line'>348</span>  * &lt;a href="https://tools.ietf.org/html/rfc3161#section-2.4.2">
<span class='line'>349</span>  * RFC 3161 TSP section 2.4.2&lt;/a>.
<span class='line'>350</span>  * &lt;pre>
<span class='line'>351</span>  * MessageImprint ::= SEQUENCE  {
<span class='line'>352</span>  *      hashAlgorithm                AlgorithmIdentifier,
<span class='line'>353</span>  *      hashedMessage                OCTET STRING  }
<span class='line'>354</span>  * &lt;/pre>
<span class='line'>355</span>  *
<span class='line'>356</span>  * @example
<span class='line'>357</span>  * // OLD
<span class='line'>358</span>  * new KJUR.asn1.tsp.MessageImprint({
<span class='line'>359</span>  *   hashAlg: 'sha256',
<span class='line'>360</span>  *   hashValue: '1f3dea...'
<span class='line'>361</span>  * });
<span class='line'>362</span>  * // NEW
<span class='line'>363</span>  * new KJUR.asn1.tsp.MessageImprint({
<span class='line'>364</span>  *   alg: 'sha256',
<span class='line'>365</span>  *   hash: '1f3dea...'
<span class='line'>366</span>  * });
<span class='line'>367</span>  */</span><span class="WHIT">
<span class='line'>368</span> </span><span class="NAME">KJUR.asn1.tsp.MessageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>369</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>370</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>371</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>372</span> </span><span class="WHIT">	</span><span class="NAME">_DEROctetString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DEROctetString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>373</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_x509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.x509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>374</span> </span><span class="WHIT">	</span><span class="NAME">_AlgorithmIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_x509.AlgorithmIdentifier</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>375</span> 
<span class='line'>376</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1.tsp.MessageImprint.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>377</span> 
<span class='line'>378</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>379</span> 
<span class='line'>380</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>381</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>382</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_AlgorithmIdentifier</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">name</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.alg</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>383</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dHash</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DEROctetString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params.hash</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>384</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">dAlg</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dHash</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>385</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>386</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>387</span> 
<span class='line'>388</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>389</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>390</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.MessageImprint</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>391</span> 
<span class='line'>392</span> </span><span class="COMM">/**
<span class='line'>393</span>  * class for TSP TimeStampReq ASN.1 object&lt;br/>
<span class='line'>394</span>  * @name KJUR.asn1.tsp.TimeStampReq
<span class='line'>395</span>  * @class class for TSP TimeStampReq ASN.1 object
<span class='line'>396</span>  * @param {Array} params JSON object of parameters
<span class='line'>397</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>398</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>399</span>  * @see KJUR.asn1.tsp.MessageImprint
<span class='line'>400</span>  *
<span class='line'>401</span>  * @description
<span class='line'>402</span>  * &lt;pre>
<span class='line'>403</span>  * TimeStampReq ::= SEQUENCE  {
<span class='line'>404</span>  *    version          INTEGER  { v1(1) },
<span class='line'>405</span>  *    messageImprint   MessageImprint,
<span class='line'>406</span>  *    reqPolicy        TSAPolicyId               OPTIONAL,
<span class='line'>407</span>  *    nonce            INTEGER                   OPTIONAL,
<span class='line'>408</span>  *    certReq          BOOLEAN                   DEFAULT FALSE,
<span class='line'>409</span>  *    extensions       [0] IMPLICIT Extensions   OPTIONAL  }
<span class='line'>410</span>  * &lt;/pre>
<span class='line'>411</span>  *
<span class='line'>412</span>  * @example
<span class='line'>413</span>  * new KJUR.asn1.tsp.TimeStampReq({
<span class='line'>414</span>  *   messageImprint: {alg: "sha256", hash: "12ab..."},
<span class='line'>415</span>  *   policy: "1.2.3.4.5",
<span class='line'>416</span>  *   nonce: {hex: "1a2b..."},
<span class='line'>417</span>  *   certreq: true
<span class='line'>418</span>  * })
<span class='line'>419</span>  */</span><span class="WHIT">
<span class='line'>420</span> </span><span class="NAME">KJUR.asn1.tsp.TimeStampReq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>421</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>422</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>423</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>424</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>425</span> </span><span class="WHIT">	</span><span class="NAME">_DERBoolean</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBoolean</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>426</span> </span><span class="WHIT">	</span><span class="NAME">_ASN1Object</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Object</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>427</span> </span><span class="WHIT">	</span><span class="NAME">_DERObjectIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERObjectIdentifier</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>428</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>429</span> </span><span class="WHIT">	</span><span class="NAME">_MessageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.MessageImprint</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>430</span> 
<span class='line'>431</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.TimeStampReq.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>432</span> 
<span class='line'>433</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>434</span> 
<span class='line'>435</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>436</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>437</span> 
<span class='line'>438</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>439</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>440</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.messageImprint</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>441</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">params.messageImprint</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>442</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>443</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_MessageImprint</span><span class="PUNC">(</span><span class="NAME">params.messageImprint</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>444</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>445</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.policy</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>446</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERObjectIdentifier</span><span class="PUNC">(</span><span class="NAME">params.policy</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>447</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.nonce</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>448</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="NAME">params.nonce</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>449</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.certreq</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>450</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBoolean</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>451</span> 
<span class='line'>452</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>453</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>454</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>455</span> 
<span class='line'>456</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>457</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>458</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.TimeStampReq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>459</span> 
<span class='line'>460</span> </span><span class="COMM">/**
<span class='line'>461</span>  * class for TSP TimeStampResp ASN.1 object
<span class='line'>462</span>  * @name KJUR.asn1.tsp.TimeStampResp
<span class='line'>463</span>  * @class class for TSP TimeStampResp ASN.1 object
<span class='line'>464</span>  * @param {Array} params associative array of parameters
<span class='line'>465</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>466</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>467</span>  * @description
<span class='line'>468</span>  * &lt;pre>
<span class='line'>469</span>  * TimeStampResp ::= SEQUENCE  {
<span class='line'>470</span>  *    status                  PKIStatusInfo,
<span class='line'>471</span>  *    timeStampToken          TimeStampToken     OPTIONAL  }
<span class='line'>472</span>  * &lt;/pre>
<span class='line'>473</span>  */</span><span class="WHIT">
<span class='line'>474</span> </span><span class="NAME">KJUR.asn1.tsp.TimeStampResp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>475</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>476</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>477</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>478</span> </span><span class="WHIT">	</span><span class="NAME">_ASN1Object</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Object</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>479</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>480</span> </span><span class="WHIT">	</span><span class="NAME">_PKIStatusInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.PKIStatusInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>481</span> 
<span class='line'>482</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.TimeStampResp.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>483</span> 
<span class='line'>484</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>485</span> 
<span class='line'>486</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>487</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>488</span> 
<span class='line'>489</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_PKIStatusInfo</span><span class="PUNC">(</span><span class="NAME">params.statusinfo</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>490</span> 
<span class='line'>491</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.econtent</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>492</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.TimeStampToken</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getContentInfo</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>493</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>494</span> 
<span class='line'>495</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.tst</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> 
<span class='line'>496</span> 	    </span><span class="NAME">params.tst</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.ASN1Object</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>497</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">params.tst</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>498</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>499</span> 
<span class='line'>500</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>501</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>502</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>503</span> 
<span class='line'>504</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>505</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>506</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.TimeStampResp</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>507</span> 
<span class='line'>508</span> </span><span class="COMM">// --- BEGIN OF RFC 2510 CMP -----------------------------------------------</span><span class="WHIT">
<span class='line'>509</span> 
<span class='line'>510</span> </span><span class="COMM">/**
<span class='line'>511</span>  * class for TSP PKIStatusInfo ASN.1 object
<span class='line'>512</span>  * @name KJUR.asn1.tsp.PKIStatusInfo
<span class='line'>513</span>  * @class class for TSP PKIStatusInfo ASN.1 object
<span class='line'>514</span>  * @param {Array} params associative array of parameters
<span class='line'>515</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>516</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>517</span>  * @description
<span class='line'>518</span>  * &lt;pre>
<span class='line'>519</span>  * PKIStatusInfo ::= SEQUENCE {
<span class='line'>520</span>  *    status                  PKIStatus,
<span class='line'>521</span>  *    statusString            PKIFreeText     OPTIONAL,
<span class='line'>522</span>  *    failInfo                PKIFailureInfo  OPTIONAL  }
<span class='line'>523</span>  * &lt;/pre>
<span class='line'>524</span>  *
<span class='line'>525</span>  * @example
<span class='line'>526</span>  * new KJUR.asn1.tsp.PKIStatusInfo("granted")
<span class='line'>527</span>  * new KJUR.asn1.tsp.PKIStatusInfo({status: "granted"})
<span class='line'>528</span>  * new KJUR.asn1.tsp.PKIStatusInfo({
<span class='line'>529</span>  *   status: 2, // rejection
<span class='line'>530</span>  *   statusString: ["unsupported algorithm"], // OPTION
<span class='line'>531</span>  *   failInfo: 'badAlg' // OPTION
<span class='line'>532</span>  * })
<span class='line'>533</span>  */</span><span class="WHIT">
<span class='line'>534</span> </span><span class="NAME">KJUR.asn1.tsp.PKIStatusInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>535</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>536</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>537</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>538</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>539</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>540</span> </span><span class="WHIT">	</span><span class="NAME">_PKIStatus</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.PKIStatus</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>541</span> </span><span class="WHIT">	</span><span class="NAME">_PKIFreeText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.PKIFreeText</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>542</span> </span><span class="WHIT">	</span><span class="NAME">_PKIFailureInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.PKIFailureInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>543</span> 
<span class='line'>544</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.PKIStatusInfo.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>545</span> 
<span class='line'>546</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>547</span> 
<span class='line'>548</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>549</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>550</span> 
<span class='line'>551</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>552</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>553</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_PKIStatus</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>554</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>555</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.status</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>556</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"property 'status' unspecified"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>557</span> 
<span class='line'>558</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_PKIStatus</span><span class="PUNC">(</span><span class="NAME">params.status</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>559</span> 
<span class='line'>560</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.statusstr</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>561</span> </span><span class="WHIT">		</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_PKIFreeText</span><span class="PUNC">(</span><span class="NAME">params.statusstr</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>562</span> 
<span class='line'>563</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.failinfo</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>564</span> </span><span class="WHIT">		</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_PKIFailureInfo</span><span class="PUNC">(</span><span class="NAME">params.failinfo</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>565</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>566</span> 
<span class='line'>567</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>568</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>569</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>570</span> 
<span class='line'>571</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>572</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>573</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.PKIStatusInfo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>574</span> 
<span class='line'>575</span> </span><span class="COMM">/**
<span class='line'>576</span>  * class for TSP PKIStatus ASN.1 object
<span class='line'>577</span>  * @name KJUR.asn1.tsp.PKIStatus
<span class='line'>578</span>  * @class class for TSP PKIStatus ASN.1 object
<span class='line'>579</span>  * @param {Array} params associative array of parameters
<span class='line'>580</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>581</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>582</span>  * @description
<span class='line'>583</span>  * &lt;pre>
<span class='line'>584</span>  * PKIStatus ::= INTEGER {
<span class='line'>585</span>  *    granted                (0),
<span class='line'>586</span>  *    grantedWithMods        (1),
<span class='line'>587</span>  *    rejection              (2),
<span class='line'>588</span>  *    waiting                (3),
<span class='line'>589</span>  *    revocationWarning      (4),
<span class='line'>590</span>  *    revocationNotification (5) }
<span class='line'>591</span>  * &lt;/pre>
<span class='line'>592</span>  *
<span class='line'>593</span>  * @example
<span class='line'>594</span>  * new KJUR.asn1.tsp.PKIStatus('granted')
<span class='line'>595</span>  * new KJUR.asn1.tsp.PKIStatus(2)
<span class='line'>596</span>  */</span><span class="WHIT">
<span class='line'>597</span> </span><span class="NAME">KJUR.asn1.tsp.PKIStatus</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>598</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>599</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>600</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>601</span> </span><span class="WHIT">	</span><span class="NAME">_DERInteger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERInteger</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>602</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>603</span> 
<span class='line'>604</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.PKIStatus.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>605</span> 
<span class='line'>606</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_nameValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>607</span> </span><span class="WHIT">	</span><span class="NAME">granted</span><span class="PUNC">:</span><span class="WHIT">                </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>608</span> </span><span class="WHIT">	</span><span class="NAME">grantedWithMods</span><span class="PUNC">:</span><span class="WHIT">        </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>609</span> </span><span class="WHIT">	</span><span class="NAME">rejection</span><span class="PUNC">:</span><span class="WHIT">              </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>610</span> </span><span class="WHIT">	</span><span class="NAME">waiting</span><span class="PUNC">:</span><span class="WHIT">                </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>611</span> </span><span class="WHIT">	</span><span class="NAME">revocationWarning</span><span class="PUNC">:</span><span class="WHIT">      </span><span class="NUMB">4</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>612</span> </span><span class="WHIT">	</span><span class="NAME">revocationNotification</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="WHIT">
<span class='line'>613</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>614</span> 
<span class='line'>615</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>616</span> 
<span class='line'>617</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>618</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>619</span> 
<span class='line'>620</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dObj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>621</span> 
<span class='line'>622</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>623</span> </span><span class="WHIT">	    </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>624</span> </span><span class="WHIT">		</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_nameValue</span><span class="PUNC">[</span><span class="NAME">params</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>625</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>626</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"undefined name: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>627</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>628</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>629</span> </span><span class="WHIT">	    </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>630</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>631</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"unsupported params"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>632</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>633</span> 
<span class='line'>634</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERInteger</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"int"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>635</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>636</span> 
<span class='line'>637</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>638</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>639</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.PKIStatus</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>640</span> 
<span class='line'>641</span> </span><span class="COMM">/**
<span class='line'>642</span>  * class for TSP PKIFreeText ASN.1 object
<span class='line'>643</span>  * @name KJUR.asn1.tsp.PKIFreeText
<span class='line'>644</span>  * @class class for TSP PKIFreeText ASN.1 object
<span class='line'>645</span>  * @param {Array} params associative array of parameters
<span class='line'>646</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>647</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>648</span>  * @description
<span class='line'>649</span>  * This class provides ASN.1 encoder for PKIFreeText
<span class='line'>650</span>  * defined in &lt;a href="https://tools.ietf.org/html/rfc4210#section-5.1.1">
<span class='line'>651</span>  * RFC 4210 CMP section 5.1.1&lt;/a>.
<span class='line'>652</span>  * &lt;pre>
<span class='line'>653</span>  * PKIFreeText ::= SEQUENCE { SIZE (1..MAX) OF UTF8String }
<span class='line'>654</span>  * &lt;/pre>
<span class='line'>655</span>  * 
<span class='line'>656</span>  * @example
<span class='line'>657</span>  * new KJUR.asn1.tsp.PKIFreeText([
<span class='line'>658</span>  *   "aaa", "bbb", "ccc"
<span class='line'>659</span>  * ])
<span class='line'>660</span>  */</span><span class="WHIT">
<span class='line'>661</span> </span><span class="NAME">KJUR.asn1.tsp.PKIFreeText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>662</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>663</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>664</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>665</span> </span><span class="WHIT">	</span><span class="NAME">_DERSequence</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERSequence</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>666</span> </span><span class="WHIT">	</span><span class="NAME">_DERUTF8String</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERUTF8String</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>667</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>668</span> 
<span class='line'>669</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.PKIFreeText.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>670</span> 
<span class='line'>671</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>672</span> 
<span class='line'>673</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>674</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>675</span> 
<span class='line'>676</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>677</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"wrong params: not array"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>678</span> 
<span class='line'>679</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>680</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">params.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>681</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERUTF8String</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>682</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>683</span> </span><span class="WHIT">	
<span class='line'>684</span> 	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERSequence</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">array</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>685</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">seq.getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>687</span> 
<span class='line'>688</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>689</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>690</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.PKIFreeText</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>691</span> 
<span class='line'>692</span> </span><span class="COMM">/**
<span class='line'>693</span>  * class for TSP PKIFailureInfo ASN.1 object
<span class='line'>694</span>  * @name KJUR.asn1.tsp.PKIFailureInfo
<span class='line'>695</span>  * @class class for TSP PKIFailureInfo ASN.1 object
<span class='line'>696</span>  * @param {Array} params associative array of parameters
<span class='line'>697</span>  * @extends KJUR.asn1.ASN1Object
<span class='line'>698</span>  * @since jsrsasign 4.6.0 asn1tsp 1.0.0
<span class='line'>699</span>  * @description
<span class='line'>700</span>  * &lt;pre>
<span class='line'>701</span>  * PKIFailureInfo ::= BIT STRING {
<span class='line'>702</span>  *    badAlg                 (0),
<span class='line'>703</span>  *    badRequest             (2),
<span class='line'>704</span>  *    badDataFormat          (5),
<span class='line'>705</span>  *    timeNotAvailable       (14),
<span class='line'>706</span>  *    unacceptedPolicy       (15),
<span class='line'>707</span>  *    unacceptedExtension    (16),
<span class='line'>708</span>  *    addInfoNotAvailable    (17),
<span class='line'>709</span>  *    systemFailure          (25) }
<span class='line'>710</span>  * &lt;/pre>
<span class='line'>711</span>  * 
<span class='line'>712</span>  * @example
<span class='line'>713</span>  * new KJUR.asn1.tsp.PKIFailureInfo('badAlg')
<span class='line'>714</span>  * new KJUR.asn1.tsp.PKIFailureInfo(5)
<span class='line'>715</span>  */</span><span class="WHIT">
<span class='line'>716</span> </span><span class="NAME">KJUR.asn1.tsp.PKIFailureInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>717</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>718</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>719</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>720</span> </span><span class="WHIT">	</span><span class="NAME">_DERBitString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.DERBitString</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>721</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>722</span> </span><span class="WHIT">	</span><span class="NAME">_PKIFailureInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.PKIFailureInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>723</span> 
<span class='line'>724</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_nameValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>725</span> </span><span class="WHIT">	</span><span class="NAME">badAlg</span><span class="PUNC">:</span><span class="WHIT">                 </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>726</span> </span><span class="WHIT">	</span><span class="NAME">badRequest</span><span class="PUNC">:</span><span class="WHIT">             </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>727</span> </span><span class="WHIT">	</span><span class="NAME">badDataFormat</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="NUMB">5</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>728</span> </span><span class="WHIT">	</span><span class="NAME">timeNotAvailable</span><span class="PUNC">:</span><span class="WHIT">       </span><span class="NUMB">14</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>729</span> </span><span class="WHIT">	</span><span class="NAME">unacceptedPolicy</span><span class="PUNC">:</span><span class="WHIT">       </span><span class="NUMB">15</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>730</span> </span><span class="WHIT">	</span><span class="NAME">unacceptedExtension</span><span class="PUNC">:</span><span class="WHIT">    </span><span class="NUMB">16</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>731</span> </span><span class="WHIT">	</span><span class="NAME">addInfoNotAvailable</span><span class="PUNC">:</span><span class="WHIT">    </span><span class="NUMB">17</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>732</span> </span><span class="WHIT">	</span><span class="NAME">systemFailure</span><span class="PUNC">:</span><span class="WHIT">          </span><span class="NUMB">25</span><span class="WHIT">
<span class='line'>733</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>734</span> 
<span class='line'>735</span> </span><span class="WHIT">    </span><span class="NAME">_PKIFailureInfo.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>736</span> 
<span class='line'>737</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>738</span> 
<span class='line'>739</span> </span><span class="WHIT">    </span><span class="NAME">this.getEncodedHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>740</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>741</span> 
<span class='line'>742</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>743</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>744</span> </span><span class="WHIT">	    </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>745</span> </span><span class="WHIT">		</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_nameValue</span><span class="PUNC">[</span><span class="NAME">params</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>746</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>747</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"undefined name: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>748</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>749</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>750</span> </span><span class="WHIT">	    </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>751</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>752</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"wrong params"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>753</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>754</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_DERBitString</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">"bin"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">value.toString</span><span class="PUNC">(</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>755</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>756</span> 
<span class='line'>757</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.setByParam</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>758</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>759</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.PKIFailureInfo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Object</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>760</span> 
<span class='line'>761</span> </span><span class="COMM">// --- END OF RFC 2510 CMP -------------------------------------------</span><span class="WHIT">
<span class='line'>762</span> 
<span class='line'>763</span> </span><span class="COMM">/**
<span class='line'>764</span>  * abstract class for TimeStampToken generator (DEPRECATED)&lt;br/>
<span class='line'>765</span>  * @name KJUR.asn1.tsp.AbstractTSAAdapter
<span class='line'>766</span>  * @class abstract class for TimeStampToken generator
<span class='line'>767</span>  * @param {Array} params associative array of parameters
<span class='line'>768</span>  * @since jsrsasign 4.7.0 asn1tsp 1.0.1
<span class='line'>769</span>  * @deprecated since jsrsasign 10.0.0 asn1tsp 2.0.0
<span class='line'>770</span>  *
<span class='line'>771</span>  * @description
<span class='line'>772</span>  * This is abstract class for TimeStampToken generator.
<span class='line'>773</span>  */</span><span class="WHIT">
<span class='line'>774</span> </span><span class="NAME">KJUR.asn1.tsp.AbstractTSAAdapter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>775</span> </span><span class="WHIT">    </span><span class="NAME">this.getTSTHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">msgHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>776</span> </span><span class="WHIT">        </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"not implemented yet"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>777</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>778</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>779</span> 
<span class='line'>780</span> </span><span class="COMM">/**
<span class='line'>781</span>  * class for simple TimeStampToken generator (DEPRECATED)&lt;br/>
<span class='line'>782</span>  * @name KJUR.asn1.tsp.SimpleTSAAdapter
<span class='line'>783</span>  * @class class for simple TimeStampToken generator
<span class='line'>784</span>  * @extends KJUR.asn1.tsp.AbstractTSAAdapter
<span class='line'>785</span>  * @param {Array} params associative array of parameters
<span class='line'>786</span>  * @since jsrsasign 4.7.0 asn1tsp 1.0.1
<span class='line'>787</span>  * @deprecated since jsrsasign 10.0.0 asn1tsp 2.0.0
<span class='line'>788</span>  *
<span class='line'>789</span>  * @description
<span class='line'>790</span>  * This is a simple TimeStampToken generator class.
<span class='line'>791</span>  */</span><span class="WHIT">
<span class='line'>792</span> </span><span class="NAME">KJUR.asn1.tsp.SimpleTSAAdapter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>793</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>794</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>795</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>796</span> </span><span class="WHIT">	</span><span class="NAME">_hashHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.crypto.Util.hashHex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>797</span> 
<span class='line'>798</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.SimpleTSAAdapter.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>799</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>800</span> </span><span class="WHIT">    </span><span class="NAME">this.serial</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>801</span> 
<span class='line'>802</span> </span><span class="WHIT">    </span><span class="NAME">this.getTSTHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">msgHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>803</span> </span><span class="WHIT">        </span><span class="COMM">// messageImprint</span><span class="WHIT">
<span class='line'>804</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_hashHex</span><span class="PUNC">(</span><span class="NAME">msgHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>805</span> </span><span class="WHIT">        </span><span class="NAME">this.params.econtent.content.messageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>806</span> </span><span class="WHIT">            </span><span class="PUNC">{</span><span class="NAME">alg</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hash</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hashHex</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>807</span> 
<span class='line'>808</span> </span><span class="WHIT">        </span><span class="COMM">// serial</span><span class="WHIT">
<span class='line'>809</span> </span><span class="WHIT">        </span><span class="NAME">this.params.econtent.content.serialNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>810</span> </span><span class="WHIT">	    </span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.serial</span><span class="PUNC">++</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>811</span> 
<span class='line'>812</span> </span><span class="WHIT">        </span><span class="COMM">// nonce</span><span class="WHIT">
<span class='line'>813</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nonceValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">Math.random</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">1000000000</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>814</span> </span><span class="WHIT">        </span><span class="NAME">this.params.econtent.content.nonce</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>815</span> </span><span class="WHIT">	    </span><span class="PUNC">{</span><span class="STRN">'int'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nonceValue</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>816</span> 
<span class='line'>817</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> 
<span class='line'>818</span>             </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.TimeStampToken</span><span class="PUNC">(</span><span class="NAME">this.params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>819</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj.getContentInfoEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>820</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>821</span> 
<span class='line'>822</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>823</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>824</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.SimpleTSAAdapter</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>825</span> </span><span class="WHIT">                  </span><span class="NAME">KJUR.asn1.tsp.AbstractTSAAdapter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>826</span> 
<span class='line'>827</span> </span><span class="COMM">/**
<span class='line'>828</span>  * class for fixed TimeStampToken generator (DEPRECATED)&lt;br/>
<span class='line'>829</span>  * @name KJUR.asn1.tsp.FixedTSAAdapter
<span class='line'>830</span>  * @class class for fixed TimeStampToken generator
<span class='line'>831</span>  * @extends KJUR.asn1.tsp.AbstractTSAAdapter
<span class='line'>832</span>  * @param {Array} params associative array of parameters
<span class='line'>833</span>  * @since jsrsasign 4.7.0 asn1tsp 1.0.1
<span class='line'>834</span>  * @deprecated since jsrsasign 10.0.0 asn1tsp 2.0.0
<span class='line'>835</span>  *
<span class='line'>836</span>  * @description
<span class='line'>837</span>  * This class generates fixed TimeStampToken except messageImprint
<span class='line'>838</span>  * for testing purpose.
<span class='line'>839</span>  * General TSA generates TimeStampToken which varies following
<span class='line'>840</span>  * fields:
<span class='line'>841</span>  * &lt;ul>
<span class='line'>842</span>  * &lt;li>genTime&lt;/li>
<span class='line'>843</span>  * &lt;li>serialNumber&lt;/li>
<span class='line'>844</span>  * &lt;li>nonce&lt;/li>
<span class='line'>845</span>  * &lt;/ul>
<span class='line'>846</span>  * Those values are provided by initial parameters.
<span class='line'>847</span>  */</span><span class="WHIT">
<span class='line'>848</span> </span><span class="NAME">KJUR.asn1.tsp.FixedTSAAdapter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>849</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>850</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.asn1</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>851</span> </span><span class="WHIT">	</span><span class="NAME">_KJUR_asn1_tsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1.tsp</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>852</span> </span><span class="WHIT">	</span><span class="NAME">_hashHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.crypto.Util.hashHex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>853</span> 
<span class='line'>854</span> </span><span class="WHIT">    </span><span class="NAME">_KJUR_asn1_tsp.FixedTSAAdapter.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>855</span> </span><span class="WHIT">    </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>856</span> 
<span class='line'>857</span> </span><span class="WHIT">    </span><span class="NAME">this.getTSTHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">msgHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>858</span> </span><span class="WHIT">        </span><span class="COMM">// fixed serialNumber</span><span class="WHIT">
<span class='line'>859</span> </span><span class="WHIT">        </span><span class="COMM">// fixed nonce        </span><span class="WHIT">
<span class='line'>860</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_hashHex</span><span class="PUNC">(</span><span class="NAME">msgHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>861</span> </span><span class="WHIT">        </span><span class="NAME">this.params.econtent.content.messageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'>862</span> </span><span class="WHIT">            </span><span class="PUNC">{</span><span class="NAME">alg</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hash</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hashHex</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>863</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_KJUR_asn1_tsp.TimeStampToken</span><span class="PUNC">(</span><span class="NAME">this.params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>864</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj.getContentInfoEncodedHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>865</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>866</span> 
<span class='line'>867</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>868</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>869</span> </span><span class="NAME">YAHOO.lang.extend</span><span class="PUNC">(</span><span class="NAME">KJUR.asn1.tsp.FixedTSAAdapter</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>870</span> </span><span class="WHIT">                  </span><span class="NAME">KJUR.asn1.tsp.AbstractTSAAdapter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>871</span> 
<span class='line'>872</span> </span><span class="COMM">// --- TSP utilities -------------------------------------------------</span><span class="WHIT">
<span class='line'>873</span> 
<span class='line'>874</span> </span><span class="COMM">/**
<span class='line'>875</span>  * TSP utiliteis class
<span class='line'>876</span>  * @name KJUR.asn1.tsp.TSPUtil
<span class='line'>877</span>  * @class TSP utilities class
<span class='line'>878</span>  */</span><span class="WHIT">
<span class='line'>879</span> </span><span class="NAME">KJUR.asn1.tsp.TSPUtil</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>880</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>881</span> </span><span class="COMM">/**
<span class='line'>882</span>  * generate TimeStampToken ASN.1 object specified by JSON parameters (DEPRECATED)&lt;br/>
<span class='line'>883</span>  * @name newTimeStampToken
<span class='line'>884</span>  * @memberOf KJUR.asn1.tsp.TSPUtil
<span class='line'>885</span>  * @function
<span class='line'>886</span>  * @param {Array} param JSON parameter to generate TimeStampToken
<span class='line'>887</span>  * @return {KJUR.asn1.cms.SignedData} object just generated
<span class='line'>888</span>  * @deprecated since jsrsasign 10.0.0 asn1tsp 2.0.0 use TimeStampToken class
<span class='line'>889</span>  * @see KJUR.asn1.tsp.TimeStampToken
<span class='line'>890</span>  *
<span class='line'>891</span>  * @description
<span class='line'>892</span>  * @example
<span class='line'>893</span>  */</span><span class="WHIT">
<span class='line'>894</span> </span><span class="NAME">KJUR.asn1.tsp.TSPUtil.newTimeStampToken</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>895</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.tsp.TimeStampToken</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>896</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>897</span> 
<span class='line'>898</span> </span><span class="COMM">/**
<span class='line'>899</span>  * parse hexadecimal string of TimeStampReq
<span class='line'>900</span>  * @name parseTimeStampReq
<span class='line'>901</span>  * @memberOf KJUR.asn1.tsp.TSPUtil
<span class='line'>902</span>  * @function
<span class='line'>903</span>  * @param {String} hexadecimal string of TimeStampReq
<span class='line'>904</span>  * @return {Array} JSON object of parsed parameters
<span class='line'>905</span>  * @description
<span class='line'>906</span>  * This method parses a hexadecimal string of TimeStampReq
<span class='line'>907</span>  * and returns parsed their fields:
<span class='line'>908</span>  * @example
<span class='line'>909</span>  * var json = KJUR.asn1.tsp.TSPUtil.parseTimeStampReq("302602...");
<span class='line'>910</span>  * // resulted DUMP of above 'json':
<span class='line'>911</span>  * {
<span class='line'>912</span>  *  messageImprint: {
<span class='line'>913</span>  *       alg: 'sha256',          // MessageImprint hashAlg
<span class='line'>914</span>  *       hash: 'a1a2a3a4...'},   // MessageImprint hashValue
<span class='line'>915</span>  *  policy: '1.2.3.4.5',             // tsaPolicy (OPTION)
<span class='line'>916</span>  *  nonce: '9abcf318...',            // nonce (OPTION)
<span class='line'>917</span>  *  certreq: true}                   // certReq (OPTION)
<span class='line'>918</span>  */</span><span class="WHIT">
<span class='line'>919</span> </span><span class="NAME">KJUR.asn1.tsp.TSPUtil.parseTimeStampReq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">reqHex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>920</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>921</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getChildIdx</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>922</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>923</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getTLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>924</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">json</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>925</span> </span><span class="WHIT">    </span><span class="NAME">json.certreq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>926</span> 
<span class='line'>927</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idxList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">reqHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>928</span> 
<span class='line'>929</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idxList.length</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>930</span> </span><span class="WHIT">        </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"TimeStampReq must have at least 2 items"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>931</span> 
<span class='line'>932</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">miHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">reqHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idxList</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>933</span> </span><span class="WHIT">    </span><span class="NAME">json.messageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.tsp.TSPUtil.parseMessageImprint</span><span class="PUNC">(</span><span class="NAME">miHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> 
<span class='line'>934</span> 
<span class='line'>935</span>     </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">idxList.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>936</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">idxList</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>937</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">reqHex.substr</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>938</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// case OID</span><span class="WHIT">
<span class='line'>939</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">policyHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">reqHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>940</span> </span><span class="WHIT">            </span><span class="NAME">json.policy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.hextooidstr</span><span class="PUNC">(</span><span class="NAME">policyHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>941</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>942</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"02"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// case INTEGER</span><span class="WHIT">
<span class='line'>943</span> </span><span class="WHIT">            </span><span class="NAME">json.nonce</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">reqHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>944</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>945</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"01"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// case BOOLEAN</span><span class="WHIT">
<span class='line'>946</span> </span><span class="WHIT">            </span><span class="NAME">json.certreq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>947</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>948</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>949</span> 
<span class='line'>950</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">json</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>951</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>952</span> 
<span class='line'>953</span> </span><span class="COMM">/**
<span class='line'>954</span>  * parse hexadecimal string of MessageImprint
<span class='line'>955</span>  * @name parseMessageImprint
<span class='line'>956</span>  * @memberOf KJUR.asn1.tsp.TSPUtil
<span class='line'>957</span>  * @function
<span class='line'>958</span>  * @param {String} hexadecimal string of MessageImprint
<span class='line'>959</span>  * @return {Array} JSON object of parsed parameters
<span class='line'>960</span>  * @description
<span class='line'>961</span>  * This method parses a hexadecimal string of MessageImprint
<span class='line'>962</span>  * and returns parsed their fields:
<span class='line'>963</span>  * @example
<span class='line'>964</span>  * var json = KJUR.asn1.tsp.TSPUtil.parseMessageImprint("302602...");
<span class='line'>965</span>  * // resulted DUMP of above 'json':
<span class='line'>966</span>  * {hashAlg: 'sha256',          // MessageImprint hashAlg
<span class='line'>967</span>  *  hashValue: 'a1a2a3a4...'}   // MessageImprint hashValue
<span class='line'>968</span>  */</span><span class="WHIT">
<span class='line'>969</span> </span><span class="NAME">KJUR.asn1.tsp.TSPUtil.parseMessageImprint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">miHex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>970</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>971</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getChildIdx</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>972</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>973</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getIdxbyList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>974</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">json</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>975</span> 
<span class='line'>976</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">miHex.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>977</span> </span><span class="WHIT">        </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"head of messageImprint hex shall be '30'"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>978</span> 
<span class='line'>979</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idxList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">miHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>980</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashAlgOidIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">miHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>981</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashAlgHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">miHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hashAlgOidIdx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>982</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashAlgOid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.hextooidstr</span><span class="PUNC">(</span><span class="NAME">hashAlgHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>983</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashAlgName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.oid2name</span><span class="PUNC">(</span><span class="NAME">hashAlgOid</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>984</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hashAlgName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>985</span> </span><span class="WHIT">        </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"hashAlg name undefined: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hashAlgOid</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>986</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hashAlgName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>987</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hashValueIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">miHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>988</span> 
<span class='line'>989</span> </span><span class="WHIT">    </span><span class="NAME">json.alg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hashAlg</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>990</span> </span><span class="WHIT">    </span><span class="NAME">json.hash</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">miHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hashValueIdx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> 
<span class='line'>991</span> 
<span class='line'>992</span>     </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">json</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>993</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>994</span> 
<span class='line'>995</span> </span></pre></body></html>